Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty cart validation #21295

Merged
merged 5 commits into from
Mar 1, 2019
Merged

Fix empty cart validation #21295

merged 5 commits into from
Mar 1, 2019

Conversation

wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Feb 18, 2019

Description

This PR prevents from running UpdateItemQty validation before Clear Shopping Cart action is triggered. In the other case validation breaks for use case in which product existing in cart went out of stock in the meantime.

Fixed Issues

  1. Cart can't be emptied if any product is out of stock #21294

Manual testing scenarios

  1. Add simple product in backend, set positive quantity and Stock Status = In Stock
  2. Open another browser tab and access product in frontend
  3. Add product to cart
  4. Navigate to cart
  5. Enable "Clear Shopping Cart" button by running this code in console:
    jQuery('.action.clear').show()
    It's hidden in CSS for some reason.
  6. Back to product form in the backend
  7. Set Stock Status for product to Out of Stock, save
  8. Click "Clear Shopping Cart" button in the cart in frontend

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Feb 18, 2019

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @wojtekn. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@wojtekn
Copy link
Contributor Author

wojtekn commented Feb 18, 2019

@magento-engcom-team give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @wojtekn. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @wojtekn, here is your new Magento instance.
Admin access: https://pr-21295.instances.magento-community.engineering/admin
Login: admin Password: 123123q

@wojtekn
Copy link
Contributor Author

wojtekn commented Feb 18, 2019

Issue doesn't reproduce on test instance based on PR changes.

@swnsma
Copy link
Contributor

swnsma commented Feb 21, 2019

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @swnsma. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @swnsma, here is your Magento instance.
Admin access: https://i-21295-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

Copy link
Contributor

@swnsma swnsma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wojtekn,

Thank you for you contribution!

  1. Please check failed JS static tests.
  2. Could you remove hard-coded jQuery selected from the component and pass it like variable:
    "updateCartActionContainer": "#update_cart_action_container"}}'>

@swnsma
Copy link
Contributor

swnsma commented Feb 22, 2019

@wojtekn, thanks!

I will check after Travis report will be ready.

@magento-engcom-team
Copy link
Contributor

Hi @swnsma, thank you for the review.
ENGCOM-4362 has been created to process this Pull Request

@magento-engcom-team magento-engcom-team merged commit a1578b5 into magento:2.3-develop Mar 1, 2019
@ghost
Copy link

ghost commented Mar 1, 2019

Hi @wojtekn, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.2 milestone Mar 1, 2019
@wojtekn wojtekn deleted the fix_empty_cart_validation branch March 1, 2019 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants